package com.knowledgebooks.nlp;
	import java.awt.BorderLayout;
	import java.awt.Button;
	import java.awt.Checkbox;
	import java.awt.CheckboxGroup;
	import java.awt.Color;
	import java.awt.Dimension;
	import java.awt.Event;
	import java.awt.Font;
	import java.awt.Graphics;
	import java.awt.GridBagConstraints;
	import java.awt.GridBagLayout;
	import java.awt.Insets;
	import java.awt.Label;
	import java.awt.List;
	import java.awt.Panel;
	import java.awt.TextField;
/*==============================================================================
	class      WholePanel[Rajesh Unnikrishnan]
	Content:   Represents the main drawing area where the LSystems 
		image appear

	===============================================================================*/
	class WholePanel extends Panel {

		public generation2 pixgen;
		public PrmPanel specs_pnl;

		/* constructor */
		public WholePanel(PrmPanel specpanel) {
			specs_pnl = specpanel;
			setLayout(new BorderLayout());
			pixgen = new PixelGeneration();

			specs_pnl.setImagePanel(this); /* tell spec panel to draw pictures
							  in this panel */
			
		}

		public void paint(Graphics g) {
			boolean b;
			Dimension pnldim;
			double height, width;

			pnldim = this.size();


			/* draw a border */
			g.setColor(Color.black);
			g.drawRect(0,0,pnldim.width-1,pnldim.height-1);


			/* only draw if the Apply button has been pressed at least once */
			if (specs_pnl.boolDoApply==true) {
				
				height = (double)pnldim.height;
				width = (double)pnldim.width;
		
				/* run the program */
				b = pixgen.proceslss(specs_pnl,g,height,width);
				

			}
		
		}
		
		public Insets insets() {
			/* create border around outside of panel */
			return new Insets(1,1,1,1);
		}
	}


